<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    {#      图标位置#}
    {#    <link rel="icon" href="../../favicon.ico">#}
    {#    <title>ORATK</title>#}
    <title>oratk 运维平台</title>
    {% block title %}
    {% endblock %}
    <!-- Bootstrap core CSS -->
    <link href="/static/bootstrap-3.3/css/bootstrap.css" rel="stylesheet">
    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <link href="/static/bootstrap-3.3/css/ie10-viewport-bug-workaround.css" rel="stylesheet">
    <!-- Custom styles for this template -->
    <link href="/static/bootstrap-3.3/css/dashboard.css" rel="stylesheet">

    <script src="/static/jquery-1.12.4.js"></script>
    <script>window.jQuery || document.write('<script src="/static/jquery-1.12.4.js""><\/script>')</script>
    <script src="/static/bootstrap-3.3/js/bootstrap.js"></script>
    <!-- Just to make our placeholder images work. Don't actually copy the next line! -->
    <script src="/static/bootstrap-3.3/js/holder.min.js"></script>
    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <script src="/static/bootstrap-3.3/js/ie10-viewport-bug-workaround.js"></script>

    <!-- bootstrap-select -->
{#    <link rel="stylesheet"#}
{#          href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.4/css/bootstrap-select.min.css">#}
{#    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.4/js/bootstrap-select.min.js"></script>#}

    <script src="/static/bootstrap-select/1.12.4/bootstrap-select.min.js"></script>
    <link href="/static/bootstrap-select/1.12.4/bootstrap-select.min.css" rel="stylesheet">


</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
    {#<nav class="blog-masthead">#}
    <div class="container">
        <div class="navbar-header">
            <a class="navbar-brand" href="#">oratk工具</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
            <a class="navbar-brand navbar-right" href="/basic_app/logout">注销</a>
            <a class="navbar-brand navbar-right">{{ request.session.username }}</a>
            <a class="navbar-brand navbar-right">你好，</a>
        </div><!--/.navbar-collapse -->
    </div>
</nav>

<div class="container-fluid">
    <div class="row">
        <div class="col-sm-3 col-md-2 sidebar aaaa">
            <ul class="nav nav-sidebar" id="tag_id">
                {% block tag_left %}
                {% endblock %}
            </ul>
        </div>
        {% block userinfo %}
        {% endblock %}
    </div>
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->

{#//active 标签#}
{#<script>#}
{#    $(document).ready(function () {#}
{#        var local = window.location.href;#}
{#        var tda = $('.aaaa li a');#}
{#console.log(tda)#}
{#        for (i = 0; i < tda.length; i++) {#}
{#            var search_result = local.toLowerCase().search(tda[i].href.toLowerCase())#}
{#console.log(search_result)#}
{##}
{#            if (search_result != -1) {   //如果当前地址和菜单栏的某个栏目地址相等#}
{#                tda[i].parentElement.className = "active";//当前li标签用active样式#}
{#                console.log(111)#}
{##}
{#                var idn = tda[i].getAttribute('name'); // 获取当前标签的name值#}
{#                console.log(idn)#}
{#                $(idn).collapse('show');      //展开一级菜单#}
{#            }#}
{#        }#}
{#    })#}
{#</script>#}
<script>
    $(document).ready(function () {
        var local = window.location.href;
        var tda = $('.aaaa ul ul a');
        {#console.log(tda)#}
        for (i = 0; i < tda.length; i++) {
            {#var search_result = local.toLowerCase().search(tda[i].href.toLowerCase())#}
            {#if (search_result != -1) {   //如果当前地址和菜单栏的某个栏目地址相等#}
            if (tda[i].href.toLowerCase() == local.toLowerCase()) {   //如果当前地址和菜单栏的某个栏目地址相等
                tda[i].style = "color:#F00";//当前li标签用active样式
                var idn = tda[i].getAttribute('name'); // 获取当前标签的name值
                console.log(idn);
                $("#" + idn).css("color", "red");
                var dt = $("#" + idn).attr('name');
                $("#" + dt).collapse('show');
                {#var tdb = $('.aaaa ul ul');#}
                {#for (ii = 0; ii < tdb.length; ii++) {#}
                {#    var collapse_id = tdb[ii].getAttribute('id');#}
                {#    if (collapse_id != dt ) {#}
                {#        $("#" + collapse_id).collapse('hide');}#}
                {#    if (collapse_id = dt) {#}
                {#        $("#" + collapse_id).collapse('show');}}#}

            }
        }
    })
</script>
{% block script %}
{% endblock %}
</body>

</html>
